package com.qingyun.system.model.form;

import com.qingyun.system.model.validator.UpdateGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@Schema(description = "增加聊天记录表单")
public class MessageForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @NotNull(message = "主键id不能为空", groups = {UpdateGroup.class})
    @Schema(nullable = true, description = "发送者ID",requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private Long id;

    @NotBlank(message = "发送者id不能为空")
    @Schema(description = "发送者ID")
    private Long senderId;

    @NotBlank(message = "发送者类型不能为空")
    @Schema(description = "发送者类型,0-访客，1-客服，2-机器人")
    private Long senderType;

    @NotBlank(message = "消息内容不能为空")
    @Schema(description = "消息内容")
    private String message;

    @Schema(description = "消息发送时间")
    private LocalDateTime sentTime;

    @NotBlank(message = "公司名称不能为空")
    @Schema(description = "公司名称")
    private String createBy;
}
